<template>
  <div class="header">
    <div class="header-left">
      <div class="hlogo">
        <div>
          <NuxtImg src="/images/logo.png" alt="logo" />
        </div>
        <div>
        </div>
      </div>
      <div class="header-tabs">
        <div :class="{ 'tabs': true, 'activeTabs': item.path == activeTabsPath }" v-for=" (item, index) in tabsHeader">
          <NuxtLink class="tablink" :to="item.path"><span>{{ item.name }}</span></NuxtLink>
        </div>
      </div>
    </div>
    <div class="header-right">
      <div class="serach">
        <el-input v-model="input2" style="width: 240px" placeholder="查询会议" :suffix-icon="Search" />
      </div>
      <div class="create">
        <span></span>
        <span>创建会议</span>
      </div>
      <div class="login">
        <span class="logt">登录</span>/<span class="logt">注册</span>
      </div>
      <div class="lang">
        EN
      </div>
    </div>
  </div>
</template>

<script setup>
import { Search } from '@element-plus/icons-vue'
const tabsHeader = ref([
  {
    name: '首页',
    path: '/'
  },
  {
    name: '学术会议',
    path: '/about'
  }, {
    name: '学术视频',
    path: '/about1'
  }, {
    name: '产品案例',
    path: '/about2'
  },
  {
    name: '产品说明',
    path: '/about3'
  },
])
const activeTabsPath = ref('/')
const input2 = ref('')
</script>

<style lang="scss" scoped>
.header {

  width: 100%;
  display: flex;
  align-items: center;
  height: 72px;
  padding: 0 40px;
  background: #FFFFFF;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1600;
  box-sizing: border-box;
  .header-left {
    display: flex;
    align-items: center;

    .hlogo {
      display: flex;
      align-items: center;
      
      img {
        margin-top: 8px;
        width: 122px;
        height: 36px;
      }
    }

    .header-tabs {
      margin-left: 56px;
      display: flex;
      align-items: center;

      .tabs {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 24px;
        height: 72px;
        position: relative;
        cursor: pointer;

        .tablink {
          text-decoration: none;
          color: #333333;
        }


      }

      .activeTabs {
        .tablink {
          color: #165DFF;
        }

        &::before {
          content: '';
          position: absolute;
          width: 30px;
          height: 3px;
          background: #165DFF;
          bottom: 0;
          left: 50%;
          transform: translateX(-50%);
        }
      }
    }
  }

  .header-right {
    display: flex;
    align-items: center;

    .create,
    .login,
    .lang {
      display: flex;
      align-items: center;
      margin-left: 24px;
      background: #FF7D00;
      border-radius: 4px 4px 4px 4px;
      padding: 10px 20px;
      color: #FFFFFF;
      cursor: pointer;
    }

    .login {
      background: #165DFF;
      .logt{
        margin:0 2px;
        // css文字下划线
        &:hover{
          text-decoration: underline;
        }
      }
    }

    .lang {
      background: #F2F3F5;
      color: #333333;
      padding: 9px 10px;
    }
  }
}
</style>